const user = require("../sql/user");
const sql = require("../sql/index");

exports.person = function(){
// module.exports = function(){
    return (req, res, next)=>{
        sql.get(user, {type: req.query.type}, data=>{
            if(data.length > 0){
                res.send(data);
            }else{
                res.send(`0`);
            }
        })
    }
}